#include "expressionlist.h"
#include "expression.h"

ExpressionList::ExpressionList(const YYLTYPE& loc)
        : Node(loc)
{
}

QList<Expression*> ExpressionList::expressions() const
{
    QList<Expression*> result;
    Node* p = this->firstChild();
    while( p )
    {
        Expression* e = dynamic_cast<Expression*>(p);
        if ( e )
            result.append(e);
        p = p->nextSibling();
    }

    return result;
}
